The present invention relates to data storage technology, and more specifically, to a mechanism for managing a high speed memory.
A general storage system consists of a processor, a high speed memory and a low speed memory. Since a response time of the processor's access to the high speed memory is far less than that of the access to the low speed memory, the access speed can be greatly improved by storing in the high speed memory a copy of the data that are accessed frequently in the low speed memory. On the other hand, the data capacity of a high speed memory is far less than that of the low speed memory, so a certain control mechanism is needed to guarantee that the high speed memory stores only the data that are most probably to be frequently accessed. For example, according to a control mechanism called Least Recently Used (LRU) algorithm, for those data that are not used recently in the high speed memory, they will be demoted from the high speed memory in order to make room for loading other data. Those skilled in the art would appreciate that, the high speed memory and the low speed memory here are relative concepts, for example, for an internal memory and a hard disk, the internal memory is a high speed memory whereas the hard disk is a low speed memory; whereas, for the cache and the internal memory, the cache is a high speed memory and the internal memory is a low speed memory.
When there exist different types of low speed memories in the storage system, if a difference between the low speed memories is not taken into consideration while implementing the LRU algorithm, this possibly will bring deterioration of the overall performance. Assume that there are a first type of low speed memory and a second type of low speed memory with different response time in the storage system. The first type of low speed memory is for example a hard disk drive (HDD), and the second type of low speed memory is for example a solid state disk (SSD). In general, SSD has a higher IO rate or IO density than HDD. As a result, statistically, the number of times that a piece of data from SSD in the high speed memory is accessed in an elementary time interval is greater than the number of times that a piece of data from HDD in the high speed memory is accessed in an elementary time interval. According to the LRU algorithm, the high speed memory will store more data from SSD. However, the response time of SSD is less than the response time of HDD, so storing the data from HDD in the high speed memory can bring more improvements on performance. For example, if a piece of data is not stored in the high speed memory, reading the data directly from a HDD with 15000 RPM needs an average response time of 10 ms, but reading the data directly from a SSD needs an average response time of less than 1 ms.
Therefore, there exists a need for a solution of managing the high speed memory in a hybrid low speed memory system, to thereby optimize the overall performance of the system.